//package com.example.recordingpen_datacollection;
//
//import okhttp3.*;
//
//import java.io.IOException;
//
//public class Main {
//
//    public static void main(String[] args) {
//        OkHttpClient client = new OkHttpClient();
//
//        Request request = new Request.Builder()
//                .url("https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions_pro?access_token=24.5d537866573f1f5b65c45af7a53c1bf0.2592000.1716010011.282335-38076635")
//                .post(RequestBody.create(MediaType.parse("application/json"), "{\"key\": \"value\"}"))
//                .build();
//
//        client.newCall(request).enqueue(new Callback() {
//            @Override
//            public void onFailure(Call call, IOException e) {
//                e.printStackTrace();
//            }
//
//            @Override
//            public void onResponse(Call call, Response response) throws IOException {
//                if (response.isSuccessful()) {
//                    // 处理响应流
//                    try (ResponseBody responseBody = response.body()) {
//                        if (responseBody != null) {
//                            // 读取响应流
//                            System.out.println(responseBody.string());
//                        }
//                    }
//                } else {
//                    System.out.println("Request failed with code: " + response.code());
//                }
//            }
//        });
//    }
//}